/*
 * @Author: C.
 * @Date: 2023-03-27 10:20:12
 */
import { provide, inject } from 'vue';

const key = Symbol('page-wrapper');
interface instanceType {
  focusErrorBlock: (offsetHeight: number) => void;
}
export function createPageContext(instance: instanceType) {
  provide(key, instance);
}

export function usePageContext(): instanceType {
  return inject(key) as instanceType;
}
